//
//  APIsController.swift
//  App
//
//  Created by melvyn on 2018/9/15.
//

import Foundation
import Vapor

class APIsController: RouteCollection {
    
    func boot(router: Router) throws {
        router.get(use: index)
    }
    
    func index(_ req: Request) -> [String : String] {
    return [
        "user_url" : "localhost:8181/api/users/{user}",
        "user_lives_url" : "localhost:8181/api/users/{user}/lives/{live}",
        "user_comments_url" : "localhost:8181/api/users/{user}/comments/{comment}",
        "live_url" : "localhost:8181/api/lives/{live}{?trim_up,include_coms}",
        "live_upload_url" : "localhost:8181/api/lives/{live}/upload",
        "live_comments_url" : "localhost:8181/api/lives/{live}/comments"
        ]
    }
}
